<template>
  <div class="viewcontainer">
    <el-dialog title="收货地址" :visible.sync="dialogFormVisible">
      <hi-toolbar v-bind="toolbar"></hi-toolbar>
      <el-form label-width="80px">
        <el-form-item label="活动名称">
          <el-input autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary">确 定</el-button>
      </div>
    </el-dialog>
    <el-row class="view-header">
      <el-col :span="2" style="text-align: right">
        <el-button type="primary" @click="addShow">添加</el-button>
      </el-col>
    </el-row>
    <el-row class="view-main">
      <el-table ref="dataTable" height="100%" style="width: 100%">
        <el-table-column type="index" width="50" />
        <el-table-column prop="app_no" label="单号" width="180" />
        <el-table-column prop="proposer_code" label="申请人编码" width="180" />
        <el-table-column prop="proposer_type" label="申请人类型" width="180">
          <template slot-scope="scope">
            <div v-if="scope.row.app_type == 0">机构</div>
            <div v-else>个人</div>
          </template>
        </el-table-column>

        <el-table-column prop="app_code" label="应用编码" width="180" />
        <el-table-column prop="create_by" label="创建人" width="180" />
        <el-table-column prop="remark" label="备注" />
        <el-table-column prop="fauditpoint" label="审核标志" width="100">
        </el-table-column>
        <el-table-column fixed="right" label="操作" width="80">
          <template slot-scope="scope">
            <hi-taskopen :row="scope.row" @opentask="showEdit" :type="'app_no'">
              <el-button
                type="text"
                size="small"
                v-if="scope.row.fauditpoint != 0"
              >
                <i class="el-icon-edit"></i>
              </el-button>
            </hi-taskopen>
            <hi-taskopen :row="scope.row" @opentask="showEdit" :type="'app_no'">
              <el-button
                type="text"
                v-if="scope.row.fauditpoint == 0"
                size="small"
              >
                <i class="el-icon-tickets"></i>
              </el-button>
            </hi-taskopen>
            <el-button
              type="text"
              v-if="scope.row.fauditpoint != 0"
              size="small"
              @click="remove(scope.row)"
            >
              <i class="el-icon-delete"></i>
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-row>
  </div>
</template>

<script>
import { HiForm, DataSetContainer, HiToolbar } from "hi-ui";

export default {
  name: "appTrial",
  components: {},
  data() {
    return {
      dialogFormVisible: false,

      toolbar: {
        buttons: [
          {
            kind: "save",
            //text: "保存",
            type: "danger",
            icon: "el-icon-upload",
          },
          {
            kind: "backtache",
            // text: "回退",
            // type:"primary",
          },
          {
            kind: "nexttache",
            // text: "流转",
            // type:"primary",
          },

          {
            kind: "monitor",
          },
        ],
      },
      total: 100,
      //查询面板配置
      queryPanel: {
        columnsTotal: 1,
        fields: [
          {
            label: "单号",
            element: "el-input",
            name: "app_no",
          },
        ],
      },
    };
  },
  model: {
    prop: "value",
    event: "valuechange",
  },
  props: {
    value: {
      type: Object,
    },
  },

  computed: {},
  watch: {},
  methods: {
    addShow() {
      this.dialogFormVisible = true;
    },
  },
  mounted() {},
};
</script>

<style rel="stylesheet/scss" lang="scss" scope>
</style>

